<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<title>秒杀成功</title>

		<link href="/static/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="/static/basic/css/demo.css" rel="stylesheet" type="text/css" />
		<link href="/static/css/cartstyle.css" rel="stylesheet" type="text/css" />
		<link href="/static/css/optstyle.css" rel="stylesheet" type="text/css" />

		<script type="text/javascript" src="/static/js/jquery.js"></script>

	</head>

	<body>

		<!--顶部导航条 -->
		<div class="am-container header">
			<ul class="message-l">
				<div class="topMessage">
					<div class="menu-hd" th:if="${session.loginUser==null}">
						<a href="http://auth.msmall.com/login.html" target="_top" class="h">亲，请登录</a>
						<a href="http://auth.msmall.com/register.html" target="_top">免费注册</a>
					</div>
					<div class="menu-hd" th:if="${session.loginUser!=null}">
						<a href="javascript:void(0)" target="_top" class="h">欢迎:[[${session.loginUser!=null?session.loginUser.nickname:''}]]</a>
						<a href="http://auth.msmall.com/logout" target="_top">退出登录</a>
					</div>
				</div>
			</ul>
			<ul class="message-r">
				<div class="topMessage home">
					<div class="menu-hd"><a href="http://msmall.com" target="_top" class="h">首页</a></div>
				</div>
				<div class="topMessage my-shangcheng">
					<div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
				</div>
				<div class="topMessage mini-cart">
					<div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
				</div>
				<div class="topMessage favorite">

					<div class="menu-hd"><a href="http://order.msmall.com/orderlist.html" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>我的订单</span></a></div>
			</ul>
			</div>

			<!--悬浮搜索框-->

			<div class="nav white">
				<div class="logo"><img src="/static/images/logo.png" /></div>
				<div class="logoBig">
					<li><img src="/static/images/logobig.png" /></li>
				</div>

				<div class="search-bar pr">
					<a name="index_none_header_sysc" href="#"></a>
					<form>
						<input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
						<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
					</form>
				</div>
			</div>

			<div class="clear"></div>

			<!--购物车 -->
			<div class="concent">
				<div id="cartTable">
					<tr class="item-list">
						<div class="bundle  bundle-last ">
							<div th:if="${orderSn==null}" style="height: 230px;width: 1000px;">
								<h1 style="width: 250px;margin: 100px auto;font-size: 19px">很抱歉，抢购失败。。。。<a href="http://msmall.com"> 再试试>></a></h1>
							</div>
							<div th:if="${orderSn!=null}" style="height: 230px;width: 1000px;">
								<h1 style="width: 250px;margin: 100px auto;font-size: 19px;">秒杀成功。。订单号：[[${orderSn}]],正在为你创建订单。。。</h1>
							</div>
						</div>
					</tr>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>



				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">恒望科技</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于恒望</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
							<em>© 2021-2025 Hengwang.com 版权所有</em>
						</p>
					</div>
				</div>

			</div>

			<!--操作页面-->

			<div class="theme-popover-mask"></div>

			<div class="theme-popover">
				<div class="theme-span"></div>
				<div class="theme-poptit h-title">
					<a href="javascript:;" title="关闭" class="close">×</a>
				</div>
				<div class="theme-popbod dform">
					<form class="theme-signin" name="loginform" action="" method="post">

						<div class="theme-signin-left">

							<li class="theme-options">
								<div class="cart-title">颜色：</div>
								<ul>
									<li class="sku-line selected">12#川南玛瑙<i></i></li>
									<li class="sku-line">10#蜜橘色+17#樱花粉<i></i></li>
								</ul>
							</li>
							<li class="theme-options">
								<div class="cart-title">包装：</div>
								<ul>
									<li class="sku-line selected">包装：裸装<i></i></li>
									<li class="sku-line">两支手袋装（送彩带）<i></i></li>
								</ul>
							</li>
							<div class="theme-options">
								<div class="cart-title number">数量</div>
								<dd>
									<input class="am-btn am-btn-default" name="" type="button" value="-" />
									<input class="text_box" name="" type="text" value="1" style="width:30px;" />
									<input class="am-btn am-btn-default" name="" type="button" value="+" />
									<span  class="tb-hidden">库存<span class="stock">1000</span>件</span>
								</dd>

							</div>
							<div class="clear"></div>
							<div class="btn-op">
								<div class="btn am-btn am-btn-warning">确认</div>
								<div class="btn close am-btn am-btn-warning">取消</div>
							</div>

						</div>
						<div class="theme-signin-right">
							<div class="img-info">
								<img src="/static/images/kouhong.jpg_80x80.jpg" />
							</div>
							<div class="text-info">
								<span class="J_Price price-now">¥39.00</span>
								<span id="Stock" class="tb-hidden">库存<span class="stock">1000</span>件</span>
							</div>
						</div>

					</form>
				</div>
			</div>
		<!--引导 -->
		<div class="navCir">
			<li><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
			<li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
			<li class="active"><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>	
			<li><a href="/static/person/index.html"><i class="am-icon-user"></i>我的</a></li>					
		</div>
	</body>
	<script type="text/javascript">
		$(".increase").click(function () {
            var curentNum = $(this).parent().find(".goodsNum").val();
            var skuId = $(this).parent().attr("skuid");
            var num = parseInt(curentNum)+1;
            location.href="http://cart.msmall.com/updateCartCount?skuId="+skuId+"&count="+num;
		    return false;
        })

        $(".reduce").click(function () {
            var curentNum = $(this).parent().find(".goodsNum").val();
            var num = parseInt(curentNum)>0?(parseInt(curentNum)-1):0;
            var skuId = $(this).parent().attr("skuid");
            location.href="http://cart.msmall.com/updateCartCount?skuId="+skuId+"&count="+num;
            return false;
        })

		$(".check").click(function () {

            console.info($(this).prop("checked"));
            //拿到skuId
            var skuID=$(this).parent().attr("skuId");
            console.info("skuID:"+skuID);
//        return false;
            var checked=($(this).prop("checked"))?1:0;
            location.href="http://cart.msmall.com/updateCartChecked?skuId="+skuID+"&checked="+checked;
            return false;
        })

		$(".delete").click(function () {
			var skuId =$(this).parent().attr("skuid");
			console.log("删除的skuid:",skuId)
            location.href="http://cart.msmall.com/deleteItem?skuId="+skuId;
			return false;
        })
		function toTrade() {
		    var count = parseInt($("#J_SelectedItemsCount").text());
		    if (count == 0){
		        alert($("#J_Go").attr("aria-label"));
		        return;
			}
            window.location.href = "http://order.msmall.com/totrade";
        }

	</script>
</html>